import request from "@/utils/request";

// 个人中心
// 获取消息列表
export const getInformList = async (data = {}) => {
    return await request.get("/sxnf_team/noticeController/page", data).then((res) => {
        return res;
    });
};
// 标记为已读
export const markRead = async (data: any) => {
    data.noticeIds = data.noticeIds.join(",");
    return await request.post("/sxnf_team/noticeController/updateIsReadByNoticeIdAndTeamId", data).then((res) => {
        return res;
    });
};
// 删除
export const deleteMsg = async (data: any) => {
    data.noticeIds = data.noticeIds.join(",");
    return await request.post("/sxnf_team/noticeController/delete", data).then((res) => {
        return res;
    });
};
// 查看内容
export const looks = async (data = {}) => {
    return await request.get("/sxnf_team/noticeController/getByNoticeId", data).then((res) => {
        return res;
    });
};
// 获取消息接收配置
export const getInformConfig = async (data = {}) => {
    return await request.get("/sxnf_team/messages/page", data).then((res) => {
        return res;
    });
};

// 消息接收配置
export const setInformConfig = async (data = {}) => {
    return await request.post("/sxnf_team/messages/edit", data).then((res) => {
        return res;
    });
};
